package java_1_13.singlelinked_list;

public class Test {
    public static void main(String[] args) {
        SinglelinkedList singlelinkedList=new SinglelinkedList();
        singlelinkedList.addFirst(3);
        singlelinkedList.addFirst(1);
        singlelinkedList.addIndex(1,2);
        singlelinkedList.addIndex(3,4);
        singlelinkedList.addIndex(4,5);
        System.out.println(singlelinkedList.toString());
        System.out.println(singlelinkedList.contains(6));
        System.out.println(singlelinkedList.get(2));
        System.out.println(singlelinkedList.set(4,6));
        System.out.println(singlelinkedList.toString());
        singlelinkedList.removeIndex(2);
        singlelinkedList.removeFirst();
        singlelinkedList.removeLast();
        System.out.println(singlelinkedList.toString());
        singlelinkedList.addFirst(5);
        singlelinkedList.addFirst(5);
        singlelinkedList.addFirst(4);
        singlelinkedList.addFirst(3);
        singlelinkedList.addFirst(2);
        singlelinkedList.addFirst(1);
        singlelinkedList.addFirst(1);
        singlelinkedList.addFirst(1);
        System.out.println(singlelinkedList.toString());
        singlelinkedList.removeValOnce(5);
        singlelinkedList.removeValAll(1);
        System.out.println(singlelinkedList.toString());
        singlelinkedList.removeValAll(4);
        System.out.println(singlelinkedList.toString());
    }
}
